1 /****************************** Module Header ******************************\
2 Module Name: CppCLINETAssemblyWrapper.h
3 Project: CppCLINETAssemblyWrapper
4 Copyright (c) Microsoft Corporation.
6 The code in this file declares the C++ wrapper class CSSimpleObjectWrapper
7 for the .NET class CSSimpleObject defined in the .NET class library
8 CSClassLibrary. Your native C++ application can include this wrapper class
9 and link to the DLL to indirectly call the .NET class.
11 CppCallNETAssemblyWrapper (a native C++ application)
13 CppCLINETAssemblyWrapper (this C++/CLI wrapper)
15 CSClassLibrary (a .NET assembly)
17 This source is subject to the Microsoft Public License.
18 See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
19 All other rights reserved.
21 THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
22 EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
23 WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
24 \***************************************************************************/
30 #ifdef CPPCLINETASSEMBLYWRAPPER_EXPORTS
31 #define SYMBOL_DECLSPEC __declspec(dllexport)
33 #define SYMBOL_DECLSPEC __declspec(dllimport)
37 // This native C++ class wraps the C# class CSSimpleObject defined in the
38 // .NET class library CSClassLibrary.
39 class SYMBOL_DECLSPEC CSSimpleObjectWrapper
42 CSSimpleObjectWrapper(void);
43 virtual ~CSSimpleObjectWrapper(void);
46 float get_FloatProperty(void);
47 void set_FloatProperty(float fVal
);
50 HRESULT
ToString(PWSTR pszBuffer
, DWORD dwSize
);
53 static int GetStringLength(PCWSTR pszString
);